package com.ymatou.idcard.api.testcase;

import java.util.ArrayList;
import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.idcard.api.parameter.GetCardInfosByBatchReceiverBean;
import com.ymatou.idcard.api.parameter.IdCardInfo;
import com.ymatou.idcard.api.service.GetCardInfosByBatchReceiverCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;

/**
 * 批量查询收件人身份证号接口 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_GetCardInfosByBatchReceiver {

	private static GetCardInfosByBatchReceiverBean batchCardInfoBean;
	private static GetCardInfosByBatchReceiverCall batchCardInfoCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("批量查询收件人身份证号接口");
	}

	@Before
	public void caseUp() {
		batchCardInfoBean = new GetCardInfosByBatchReceiverBean();
		batchCardInfoCall = new GetCardInfosByBatchReceiverCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(batchCardInfoCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCardInfosByBatchReceiver_001() {
		Logger.start(true,"批量查询收件人身份证号成功");
		try {
			List<IdCardInfo> IdCardInfos = new ArrayList<IdCardInfo>();
			IdCardInfo idCard1 = new IdCardInfo();
			IdCardInfo idCard2 = new IdCardInfo();
			IdCardInfo idCard3 = new IdCardInfo();
			IdCardInfo idCard4 = new IdCardInfo();
			IdCardInfo idCard5 = new IdCardInfo();
			IdCardInfo idCard6 = new IdCardInfo();
			IdCardInfo idCard7 = new IdCardInfo();
			IdCardInfo idCard8 = new IdCardInfo();
			IdCardInfo idCard9 = new IdCardInfo();
			IdCardInfo idCard10 = new IdCardInfo();
			idCard1.setMobile("13365959457");
			idCard1.setName("大姐大姐");
			;
			idCard2.setMobile("13942565588");
			idCard2.setName("夏颖");
			;
			idCard3.setMobile("13942565587");
			idCard3.setName("佐助");
			;
			IdCardInfos.add(idCard1);
			IdCardInfos.add(idCard2);
			IdCardInfos.add(idCard3);
			batchCardInfoBean.setBuyerId("1113");
			batchCardInfoBean.setIdCardInfos(IdCardInfos);
			batchCardInfoBean.setIsCheckLocal(false);

			batchCardInfoCall.setData(batchCardInfoBean);
			batchCardInfoCall.callService();

			Logger.comment("请求报文:" + batchCardInfoCall.getEntityString());
			Logger.comment("返回报文:" + batchCardInfoCall.getReturnData());

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}